Divide a String Into Groups of Size k solution